package gov.pbc.nn.core.job;

public class SynchronousDataProxy implements SynchronousData {
  private String _endpoint = null;
  private SynchronousData synchronousData = null;
  
  public SynchronousDataProxy() {
    _initSynchronousDataProxy();
  }
  
  public SynchronousDataProxy(String endpoint) {
    _endpoint = endpoint;
    _initSynchronousDataProxy();
  }
  
  private void _initSynchronousDataProxy() {
    try {
      synchronousData = (new SynchronousDataServiceLocator()).getSynchronousData();
      if (synchronousData != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)synchronousData)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)synchronousData)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (synchronousData != null)
      ((javax.xml.rpc.Stub)synchronousData)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public SynchronousData getSynchronousData() {
    if (synchronousData == null)
      _initSynchronousDataProxy();
    return synchronousData;
  }
  
  public java.lang.String getAllDepartmentData() throws java.rmi.RemoteException{
    if (synchronousData == null)
      _initSynchronousDataProxy();
    return synchronousData.getAllDepartmentData();
  }
  
  public java.lang.String getAllDeptAndPersonData() throws java.rmi.RemoteException{
    if (synchronousData == null)
      _initSynchronousDataProxy();
    return synchronousData.getAllDeptAndPersonData();
  }
  
  public java.lang.String delSynDeptDatas(java.lang.String syscode, java.lang.String synendtime) throws java.rmi.RemoteException{
    if (synchronousData == null)
      _initSynchronousDataProxy();
    return synchronousData.delSynDeptDatas(syscode, synendtime);
  }
  
  public java.lang.String getSynDeptDatas(java.lang.String syscode) throws java.rmi.RemoteException{
    if (synchronousData == null)
      _initSynchronousDataProxy();
    return synchronousData.getSynDeptDatas(syscode);
  }
  
  public java.lang.String getSynPersonDatas(java.lang.String syscode) throws java.rmi.RemoteException{
    if (synchronousData == null)
      _initSynchronousDataProxy();
    return synchronousData.getSynPersonDatas(syscode);
  }
  
  public java.lang.String delSynPersonDatas(java.lang.String syscode, java.lang.String synendtime) throws java.rmi.RemoteException{
    if (synchronousData == null)
      _initSynchronousDataProxy();
    return synchronousData.delSynPersonDatas(syscode, synendtime);
  }
  
  
}